package com.konsung.ksdc.bean.netbean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * 意见与建议
 * Created by Administrator on 2016/3/28 0028.
 */
public class SuggestionNetBean implements Parcelable {
    public static final String STATE_NO_REPLIED = "1";
    public static final String STATE_REPLIED = "2";

    /* 意见反馈信息主键 */
    private String id; //

    /* 2. [不可空] 投递村医主键 */
    protected String requestEmpId;
    protected MachineNetBean empDto;

    /* 3. [不可空] 内容 */
    protected String suggestionContent;

    /* 4. [不可空] 投递日期 */
    protected String createDate;

    /* 5. [可空] 处理状态1无处理、2已回复 */
    protected String suggestionState;

    protected List<ReplyNetBean> replies;

    /**
     * 获取意见与建议主键
     * @return 意见与建议主键
     */
    public String getId() {
        return id;
    }

    /**
     * 设置意见与建议主键
     * @param id 意见与建议主键
     */
    public void setId(String id) {
        this.id = id;
    }

    /**
     * 提交的账号主键
     * @return 账号主键
     */
    public String getRequestEmpId() {
        return requestEmpId;
    }

    /**
     * 设置账号主键
     * @param requestEmpId 账号主键
     */
    public void setRequestEmpId(String requestEmpId) {
        this.requestEmpId = requestEmpId;
    }

    /**
     * 获取一体机信息Bean
     * @return 一体机信息Bean
     */
    public MachineNetBean getEmpDto() {
        return empDto;
    }

    /**
     * 设置一体机信息Bean
     * @param empDto 一体机信息Bean
     */
    public void setEmpDto(MachineNetBean empDto) {
        this.empDto = empDto;
    }

    /**
     * 获取意见与建议内容
     * @return 意见与建议内容
     */
    public String getSuggestionContent() {
        return suggestionContent;
    }

    /**
     * 设置意见与建议内容
     * @param suggestionContent 意见与建议内容
     */
    public void setSuggestionContent(String suggestionContent) {
        this.suggestionContent = suggestionContent;
    }

    /**
     * 获取提交时间
     * @return 提交时间
     */
    public String getCreateDate() {
        return createDate;
    }

    /**
     * 设置提交时间
     * @param createDate 提交时间
     */
    public void setCreateDate(String createDate) {
        this.createDate = createDate;
    }

    /**
     * 获取意见与建议状态
     * @return 意见与建议状态
     */
    public String getSuggestionState() {
        return suggestionState;
    }

    /**
     * 设置意见与建议状态
     * @param suggestionState 意见与建议状态
     */
    public void setSuggestionState(String suggestionState) {
        this.suggestionState = suggestionState;
    }

    /**
     * 获取反馈信息集合
     * @return 反馈信息集合
     */
    public List<ReplyNetBean> getReplies() {
        return replies;
    }

    /**
     * 设置反馈信息集合
     * @param replies 反馈信息集合
     */
    public void setReplies(List<ReplyNetBean> replies) {
        this.replies = replies;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.id);
        dest.writeString(this.requestEmpId);
        dest.writeParcelable(this.empDto, flags);
        dest.writeString(this.suggestionContent);
        dest.writeString(this.createDate);
        dest.writeString(this.suggestionState);
        dest.writeTypedList(replies);
    }

    /**
     * 序列化实体类对象
     * @param in Parcel对象
     */
    protected SuggestionNetBean(Parcel in) {
        this.id = in.readString();
        this.requestEmpId = in.readString();
        this.empDto = in.readParcelable(MachineNetBean.class.getClassLoader());
        this.suggestionContent = in.readString();
        this.createDate = in.readString();
        this.suggestionState = in.readString();
        this.replies = in.createTypedArrayList(ReplyNetBean.CREATOR);
    }

    public static final Parcelable.Creator<SuggestionNetBean> CREATOR = new
            Parcelable.Creator<SuggestionNetBean>() {
                @Override
                public SuggestionNetBean createFromParcel(Parcel source) {
                    return new SuggestionNetBean(source);
                }

                @Override
                public SuggestionNetBean[] newArray(int size) {
                    return new SuggestionNetBean[size];
                }
            };
}
